import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import Antd from 'ant-design-vue';
import VueParticles from 'vue-particles';
// 希望使用5.x版本的话,需要在package.json中更新版本号,并切换引用方式
import * as echarts from 'echarts';
import 'echarts-gl';
import scroll from 'vue-seamless-scroll';
import 'ant-design-vue/dist/antd.less';
// import 'animate.css';

import '../src/assets/font/YousheBiaoTiHei.css';
import animated from 'animate.css';

Vue.use(animated);

const S_PRE = '_QHWY_';
Vue.prototype.$ss = {
    set: (key, value) => {
        sessionStorage.setItem(`${S_PRE}${key}`, JSON.stringify(value));
    },
    get: (key) => {
        return JSON.parse(sessionStorage.getItem(`${S_PRE}${key}`));
    },
    remove: (key) => {
        sessionStorage.removeItem(`${S_PRE}${key}`);
    },
    clear: () => {
        let arr = Object.keys(sessionStorage);
        if (arr) {
            arr = arr.filter(e => e.includes(S_PRE));
            arr.forEach(e => {
                sessionStorage.removeItem(e);
            });
        }
    }
};

Vue.prototype.$echarts = echarts;
Vue.config.productionTip = false;
Vue.use(Antd);
Vue.use(scroll);
Vue.use(VueParticles);
new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app');
